package com.sofwin.ruoyi.scyffinal.service.impl;
import com.sofwin.ruoyi.scyffinal.mapper.ScyfSiteEmergencyMapper;
import com.sofwin.ruoyi.scyffinal.pojo.ScyfFinalOnSiteEmergency;
import com.sofwin.ruoyi.scyffinal.service.ScyfSiteEmergencyService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.List;

@Service
public class ScyfSiteEmergencyServiceImpl implements ScyfSiteEmergencyService {

    @Autowired
    private ScyfSiteEmergencyMapper scyfSiteEmergencyMapper;

    /**
     * 打开该页面时显示所有处置卡，并且根据相关的查询条件显示对应的处置卡
     * @param scyfSiteEmergency 处置卡
     * @return 处置卡集合
     */
    @Override
    public List<ScyfFinalOnSiteEmergency> selectScyfSiteEmergencyList(ScyfFinalOnSiteEmergency scyfSiteEmergency) {
        return scyfSiteEmergencyMapper.selectScyfSiteEmergencyList(scyfSiteEmergency);
    }

    @Override
    public ScyfFinalOnSiteEmergency selectScyfFinalOnSiteEmergencyById(Integer id) {
        return scyfSiteEmergencyMapper.selectScyfFinalOnSiteEmergencyById(id);
    }

    /**
     * 新增处置卡
     * @param scyfSiteEmergency 处置卡
     * @return 处置卡集合
     */
    @Override
    public int insertScyfSiteEmergency(ScyfFinalOnSiteEmergency scyfSiteEmergency) {
        return scyfSiteEmergencyMapper.insertScyfSiteEmergency(scyfSiteEmergency);
    }

    /**
     * 修改处置卡
     * @param scyfSiteEmergency 处置卡
     * @return 处置卡集合
     */
    @Override
    public int updateScyfSiteEmergency(ScyfFinalOnSiteEmergency scyfSiteEmergency) {
        return scyfSiteEmergencyMapper.updateScyfSiteEmergency(scyfSiteEmergency);
    }

    /**
     * 批量删除处置卡
     * @param id 处置卡id
     * @return 处置卡集合
     */
    @Override
    public int deleteScyfSiteEmergencyByIds(Integer[] id) {
        return scyfSiteEmergencyMapper.deleteScyfSiteEmergencyByIds(id);
    }
}
